<template>
  <div class="PopupModal" @click="emit('close')">
    <div class="main" @click.stop.prevent="noop">
      <div class="title">
        <slot name="title" />
      </div>
      <div class="content">
        <div class="inner">
          <slot />
        </div>
      </div>
    </div>
  </div>
</template>
<script lang="ts" setup>
const emit = defineEmits(['close'])
const noop = () => 0
</script>
<style lang="scss" scoped>
.PopupModal {
  background: rgba(0, 0, 0, 0.5);
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;

  .main {
    width: 700px;
  }

  .title {
    height: 68px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .content {
    background: linear-gradient(to bottom, #fbf8f4, #dcc7a4);
    margin-top: -34px;
    border-radius: 30px;
    height: 70vh;
    padding: 80px 0;
    display: flex;

    .inner {
      padding: 0 40px;
      flex: 1;
      overflow-y: auto;
    }
  }
}
</style>
